<template>
	<el-table
		:data="tableData"
		style="width: 100%; margin-bottom: 20px"
		:cell-style="{ textAlign: 'center' }"
		:header-cell-style="{ textAlign: 'center', background: 'var(--el-table-row-hover-bg-color)', color: 'var(--el-text-color-primary)' }"
		row-key="id"
		border
		default-expand-all
	>
		<el-table-column type="index" label="序号" width="80" />
		<el-table-column prop="reviewUserName" label="专家名称" />
		<el-table-column prop="workPlace" label="工作单位" />
		<el-table-column prop="office" label="专家职务"> </el-table-column>
		<el-table-column prop="reviewUserPhone" label="联系方式"> </el-table-column>
		<el-table-column prop="industryFieldsName" label="擅长行业领域"> </el-table-column>
		<el-table-column prop="professionalFieldsName" label="擅长专业领域"> </el-table-column>
		<el-table-column prop="expertTypeName" label="专家类别" />
		<el-table-column prop="evaluateAttend" label="是否参会">
			<template #default="scope">
				{{ dictionary.evaluateAttend(scope.row.attend) }}
			</template>
		</el-table-column>
		<el-table-column fixed="right" label="操作" min-width="120">
			<template #default="{ row }">
				<el-button link type="primary" size="small" @click="goExpert(row)">查看专家信息</el-button>
			</template>
		</el-table-column>
	</el-table>
</template>

<script lang="ts" setup>
import { toRefs, defineProps } from 'vue';
import dictionary from '/@/views/expertDatabase/evaluate/dictionary';
import { useRouter } from 'vue-router';
const router = useRouter();
const props = defineProps({
	tableData: Array,
});
//查看专家数据
const goExpert = (row: any) => {
	router.push({
		path: '/expertDatabase/expert/operate/index',
		query: {
			operateType: 'view',
			expertInfoId: row.reviewUserId,
			status: '',
		},
	});
};
const { tableData } = toRefs(props);
</script>

<style lang="scss" scoped></style>
